
# 第一步
file = open(r"E:\python\b.txt","a")
# 第二步
file.write("hello\n")
# 第三步
file.close()